GBML manual / Language

The GBML language

A map of the language pages - what each one is about, and the order that makes the most sense to read them in.

What this section is about

GBML is the language you write your game's behavior in. A language here means a fixed set of words and rules the computer understands, so that you can tell it exactly what should happen: when this button is pressed, move that character. You write GBML, and Gbabel turns it into a game the Game Boy Advance can run.

The pages in this section are about the language itself, not about any one feature of the game. Movement, drawing and sound each have their own sections. Everything here is what those sections are written in.

A good order to read them

If you are new, read down this list. Each page uses ideas from the ones above it.

PageIt answers
What GBML isWhat kind of language is this, and how does my code become a game?
Variables, types and scopeHow do I store a value under a name, and who can see it?
Expressions and statementsHow do I do arithmetic, make a choice, or repeat something?
FunctionsHow do I give a piece of code a name so I can use it again?
Where (0, 0) isWhen I give a position, what am I counting from?
Objects and instancesWhat is an object, and how is it different from one copy of it in a room?
EventsWhen does my code actually run?
The order of a frameIn what order does everything happen, sixty times a second?

The rest of the section

These pages you can read when the question comes up.

You want toRead
Group several values into one bundle with a shape you chooseStructs and constructors
Share the same code between several events and objectsScripts
Pause the game, read the game clock, or run an event by handCore basics
Know why some function or feature does not existWhat is unavailable, and why
Understand the places where the real console limits what you can doWhere the machine shows through

Scripts has three more pages inside it, about writing one, what you can pass to it, and what it becomes in the finished game. Core basics covers the few calls that belong to no other topic.

Where the rest of GBML is

Most of what you can do in GBML is a function (a named action you call, such as move_slide), a variable (a named value the engine keeps for you, such as x) or an event (a moment your code is called at). Those are sorted by topic in the other sections of this manual, with one page for every one of them. Start with the section that matches what you want your game to do.

See also: What GBML isVariables, types and scopeEventsObjects and instancesScriptsGetting started